import { Text, StyleSheet, View ,TouchableOpacity} from 'react-native'
import React, { Component } from 'react'

export default class test extends Component {
  clickBtn() {
    alert("点击搜索");
  }
  render() {
    return (
      <View style={styles.container}>
      <View style={styles.flex}>
          <View style={styles.input}>
          </View>
      </View>
      <TouchableOpacity style={styles.btn} onPress={this.clickBtn}>
          <Text style={styles.search}>搜索</Text>
      </TouchableOpacity>
      <TouchableOpacity
                    style={styles.textCenter}
                    underlayColor='gray'
                    // onPress={() => this.onLogin(this.state.username, this.state.password)}
                    onPress={this.clickBtn}
                    >
                    <Text style={styles.button}>register</Text>
      </TouchableOpacity>
  </View>
// ————————————————
// 版权声明：本文为CSDN博主「小毅哥哥」的原创文章，遵循CC 4.0 BY-SA版权协议，转载请附上原文出处链接及本声明。
// 原文链接：https://blog.csdn.net/qq_19678579/article/details/73379594
    )
  }
}

const styles = StyleSheet.create({
  container:{
    flexDirection:"row",
    height:45,
    marginTop:25
},
flex:{
    flex:1
},
input:{
    height:45,
    borderWidth:1,
    marginLeft:5,
    paddingLeft:5,
    borderColor:"#CCC",
    borderRadius:4
},
btn:{
    width:55,
    marginLeft:5,
    marginRight:5,
    backgroundColor:"#2873ff",
    height:45,
    justifyContent:"center",
    alignItems:"center"
},
search:{
    color:"#FFF",
    fontSize:15,
    fontWeight:"bold"
}
})